package look4ss.aplicativo;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class Aviso extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_aviso);

            Context c = this;
            AlertDialog.Builder b = new AlertDialog.Builder(c);
            b.setTitle(R.string.nao_possivel_detectar_localizacao_titulo);
            b.setMessage(R.string.nao_possivel_detectar_localizacao_descricao);
            b.setCancelable(true);
            b.setIcon(R.drawable.icone_gps_desligado);
            b.setPositiveButton(
                    R.string.ok,
                    new DialogInterface.OnClickListener() {
                        public void onClick(final DialogInterface d, int id) {
                            finishAffinity();
                        }
                    });
            AlertDialog alerta = b.create();
            alerta.show();
            return;
        }

    }

